<?php
$curr_controller = Yii::app()->controller->id;
$curr_action = Yii::app()->controller->action->id;
?>
<ul>    
    <?php if($curr_action == "detail" || $curr_action == "createVersion" || $curr_action == "updateVersion" ):?>
    <?php $game_id = Yii::app()->request->getParam('id');
    if(!isset($game_id)) $game_id = Yii::app()->request->getParam('game_id');
    ?>
    
    <li><?php echo CHtml::link('Tạo mới Game Version',Yii::app()->createUrl("admin/game/createVersion?game_id=".$game_id)); ?></li>
    <li><?php echo CHtml::link('Quản lý Game Version',Yii::app()->createUrl("admin/game/detail?id=".$game_id))?></li>		
    <?php else:?>
    <li><?php echo CHtml::link('Tạo mới Game',Yii::app()->createUrl("admin/game/create")); ?></li>
    <li><?php echo CHtml::link('Quản lý Game',Yii::app()->createUrl("admin/game/index"))?></li>		
    <li><?php echo CHtml::link('Sắp xếp Game',Yii::app()->createUrl("admin/game/order"))?></li>	
    <?php endif;?>
</ul>